<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <style>
        div {
            font-size: 40px;
            width: 7.5em;   /* 300px */
            height: 7.5em;
            border: solid 2px black;
        }

        p {
            font-size: 0.5em; /* 20px */
            width: 7.5em;  /* 150px */
            height: 7.5em;
            border: solid 2px blue;
            color: blue;
        }

        span {
            font-size: 0.5em;   /* 10px */
            width: 7em;         /* 70px */
            height: 6em;        /* 60px */
            border: solid 1px red;
            display: block;
            color: red;
        }
    </style>
</head>
<body>
<div>
    父元素div
    <p>
        子元素p
        <span>孙子元素span</span>
    </p>
</div>
</body>
</html>